<!--edit by kim-->
<form method="POST" action="" class="tableform" id="newmember-edit-form">
<div class="division">
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
    <tr><th><em class="red">*</em><{t}>用户名：<{/t}></th><td><{input type="text" name="pam_account[login_name]"  onchange="nameCheck(this)" size="20" vtype="required"}><span></span></td></tr>
    <tr><th><em class="red">*</em><{t}>密码：<{/t}></th><td><{input type="password" name="pam_account[login_password]" size="20" vtype="required"}></td></tr>
    <tr><th><em class="red">*</em><{t}>确认密码：<{/t}></th><td><{input type="password" name="pam_account[psw_confirm]" size="20" vtype="required"}></td></tr>
    <tr><th><em class="red">*</em><{t}>会员等级：<{/t}></th><td><{input type='select' name="member_lv[member_group_id]" vtype="required" options=$mem.lv.options value=$mem.lv.value }></td></tr>
</table>
</div>
</form>
<{area inject='.mainFoot'}>
     <div class="table-action">
	<{button type="button" label=$___b2c="保存"|t:'b2c' id="newmember-edit-form-submit"}>
</div>
<{/area}>
<script>
(function(){
	var _form = $('newmember-edit-form');
	var btn =$('newmember-edit-form-submit');
	var finder = finderGroup['<{$env.get.finder_id}>'];

	_form.store('target',{
		onComplete:function(){            

		},
		onSuccess:function(response){
			var hash_res_obj = JSON.decode(response);
			if (hash_res_obj.success != undefined && hash_res_obj.success != "")
			{
				try{
					var _dialogIns = btn.getParent('.dialog').retrieve('instance');
				}catch(e){}

				if(_dialogIns)
				{
					_dialogIns.close();
					finder.refresh.delay(400,finder);
				}
			}
			else
			{
				//alert(hash_res_obj.error);
			}            
		}
	});

	btn.addEvent('click',function(){
		_form.fireEvent('submit',{stop:$empty});



	});

})();
</script>